$.ajaxSetup({     
    contentType:"application/x-www-form-urlencoded;charset=utf-8",     
    complete:function(XMLHttpRequest,textStatus){
    	//添加异常处理
    	try{
    		var sessionstatus = XMLHttpRequest.getResponseHeader("sessionstatus");
            if("sessionOut" == sessionstatus){
                window.location.replace(contextPath+"/system/toLogin.action");  
            }
            if(403 == XMLHttpRequest.status){
            	parent.$.messager.progress('close');
            	parent.$.messager.alert('错误','操作失败，你没有权限！','error'); 
            }
    	}catch(e){}
    }  
});  